#ifndef TASKLISTWIDGET_H
#define TASKLISTWIDGET_H

#include <QWidget>
#include <QtGui>
#include "restoretask.h"
#include "taskwidget.h"

class MainWindow;

class TaskListWidget : public QWidget
{
    Q_OBJECT
public:
    explicit TaskListWidget(MainWindow *parent = 0);
private:
    MainWindow *parentWindow;
    QVBoxLayout *centralLayout;
    QListWidget *listWidget;
signals:
    void taskBackupActivated(QSharedPointer<BackupTask> task);
    void taskRestoreActivated(QSharedPointer<BackupTask> task);
    void taskChanged();
    
public slots:
    void refreshTasks();
    void onSelectedTaskChanged();
    void onBackupButtonClicked();
    void onRestoreButtonClicked();
    void onEditButtonClicked();
    void onDeleteTaskClicked();
    void onDeleteInstanceClicked(QDateTime timestamp);
};

#endif // TASKLISTWIDGET_H
